Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blogpost for Introduction to Dashboard plugins #560

Merged
merged 3 commits into from
Jan 21, 2022

Conversation

ashwin-pc
Copy link
Member

Signed-off-by: Ashwin Pc ashwinpc@amazon.com

Description

Follow-up post to #526 covering Opensearch Dashboard plugins this time

Issues Resolved

#446

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the BSD-3-Clause License.

@ashwin-pc ashwin-pc requested a review from a team as a code owner December 9, 2021 00:47
title: "Introduction to OpenSearch Dashboard Plugins"
authors:
- ashwinpc
- vemsarat
Copy link
Member

@saratvemulapalli saratvemulapalli Dec 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't contribute much to deserve credits :). I believe you should be the sole author.

Copy link
Member

@saratvemulapalli saratvemulapalli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did one pass, couple of comments.

description: "Plugins are fundamental to how Opensearch works, and that similarity extends to OpenSearch Dashboards too..."
---

Plugins are fundamental to how Opensearch works, and that similarity extends to OpenSearch Dashboards too. All major components and services used within Dashboards is a plugin. Similar to OpenSearch, additional functionality can also be added using external plugins. As a follow up the blog post on how plugins work for Opensearch, in this post we will explore how plugins work for OpenSearch Dashboards.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that -> the
Not a grammatical expert, but some how it feels the would be better.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"All major components and services used within Dashboards is a plugin"
As a reader I don't know what these components and services are. It would be helpful to explain them.

The sentence starts with plural forms and converges with singular form. Probably something like ... Dashboards are plugins.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"additional functionality can also be added using external plugins"
Do we have internal and external plugins? Are they treated differently across the system?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback Sarat, I'll incorporate this feedback with any others in the next revision.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've redone this paragraph to make it easier to understand while keeping it short so that i can focus on what a plugin is sooner.

Copy link
Member

@stockholmux stockholmux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super good blog post!
Most of my comments are style.

A few general comments:

  • Should you say that this is in typescript at the start?
  • There is no mention of packaging a plugin for distribution. Is there anything that can be said about that?

_posts/2021-12-10-dashboards-plugins-intro.markdown Outdated Show resolved Hide resolved

### What is a plugin

First lets understand what an Opensearch Dashboards plugin is. In Opensearch Dashboards, plugins are classes that can be loaded via the [Dashboards plugin api](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/1.2/src/core/CONVENTIONS.md#plugin-structure) to integrate with the core system via lifecycle events. They can consist of a client side code (public), server side code (server), or both. Plugins can also interact on each other and core from both places. Plugins must also contain a manifest file that describes a set of properties, both required and optional that core system can use to load and initialize the plugin correctly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 'Openseach' -> 'OpenSearch'
  • 'lets' should be 'let's' but that is a contraction for 'let us' which is not ideal. Maybe reframe the sentence to: "First, it's important to establish what a OpenSearch Dashboard plugin is'
  • 'api' -> 'API'
  • Is there a link you can provide to what a lifecycle event is?
  • 'They' means lifecycle events? It's not clear. I'd be more explicit.
  • '(public)' and '(server)' - are these some sort of reserved word?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Openseach' -> 'OpenSearch'

done

'lets' should be 'let's' but that is a contraction for 'let us' which is not ideal. Maybe reframe the sentence to: "First, it's important to establish what a OpenSearch Dashboard plugin is'

done

'api' -> 'API'

done

Is there a link you can provide to what a lifecycle event is?

Unfortunately we dont have any documentation i can point to about it, but ive talked about it later in the post. Ive updated the text to link to that section

'They' means lifecycle events? It's not clear. I'd be more explicit.

done

'(public)' and '(server)' - are these some sort of reserved word?

Kinda. They are the reserved names for the folder for client side and server side code. (as shown in the folder structure below)

_posts/2021-12-10-dashboards-plugins-intro.markdown Outdated Show resolved Hide resolved
_posts/2021-12-10-dashboards-plugins-intro.markdown Outdated Show resolved Hide resolved
_posts/2021-12-10-dashboards-plugins-intro.markdown Outdated Show resolved Hide resolved
_posts/2021-12-10-dashboards-plugins-intro.markdown Outdated Show resolved Hide resolved
_posts/2021-12-10-dashboards-plugins-intro.markdown Outdated Show resolved Hide resolved
_authors/ashwinpc.markdown Show resolved Hide resolved
_authors/ashwinpc.markdown Show resolved Hide resolved
_authors/ashwinpc.markdown Show resolved Hide resolved
@ashwin-pc
Copy link
Member Author

Created a new issue #619 to track this PR. @stockholmux will update the post in a slightly different format keeping in mind your feedback.

@stockholmux
Copy link
Member

@ashwin-pc Are you going to update this PR or create a new one? Not sure how much your blog post will change.

@ashwin-pc
Copy link
Member Author

@ashwin-pc Are you going to update this PR or create a new one? Not sure how much your blog post will change.

I'm going to update this PR to preserve the comments. Hopefully not a lot. Mostly just the structure.

@ashwin-pc
Copy link
Member Author

A few general comments:

  1. Should you say that this is in typescript at the start?
  2. There is no mention of packaging a plugin for distribution. Is there anything that can be said about that?
  1. I don't think its necessary but i don't have a strong opinion either way. Typescript is the language of choice for OSD though, so it should be pretty obvious why the examples are in Typescript.
  2. Ive added a section for that. I've only mentioned how to generate the distributable though. Is there a way for them to publish these plugins currently that i should cover as well? I'm only aware of the plugins we list on the documentation website and those are under the opensearch-project org.

@ashwin-pc ashwin-pc force-pushed the dashboard-plugin-intro branch from 9dd7741 to 59f3b56 Compare January 13, 2022 04:28
Copy link
Member

@stockholmux stockholmux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing big - a few small changes and clarifications needed

_posts/2022-01-21-dashboards-plugins-intro.markdown Outdated Show resolved Hide resolved
_posts/2022-01-21-dashboards-plugins-intro.markdown Outdated Show resolved Hide resolved

The manifest file signature is defined by the interface [`PluginManifest`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/1.2/src/core/server/plugins/types.ts#L126-L196)

e.g. manifest file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop this line

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be sure, you're asking me to drop only line 76 right?

_posts/2022-01-21-dashboards-plugins-intro.markdown Outdated Show resolved Hide resolved
_posts/2022-01-21-dashboards-plugins-intro.markdown Outdated Show resolved Hide resolved
_posts/2022-01-21-dashboards-plugins-intro.markdown Outdated Show resolved Hide resolved
_posts/2022-01-21-dashboards-plugins-intro.markdown Outdated Show resolved Hide resolved
Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
@ashwin-pc ashwin-pc force-pushed the dashboard-plugin-intro branch from 587a738 to 2b6d9ae Compare January 20, 2022 21:53
Copy link
Member

@stockholmux stockholmux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stockholmux
Copy link
Member

Awesome post @ashwin-pc! It really came together.

I'm going to queue this up for tomorrow (1/21). I'll merge it then.

@saratvemulapalli
Copy link
Member

+1 I really loved reading through it!

@stockholmux stockholmux merged commit b2580c8 into opensearch-project:main Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants